<!DOCTYPE html>
<html>
<head>
<title>充值记录管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<#include "../../../include/resources.html">
<script type="text/javascript">
	$.canEdit = true;
</script>
<script type="text/javascript">
	$.canDelete = true;
</script>
<script type="text/javascript">
	$.canAdd = false;
</script>
<script type="text/javascript">
	$.canGrant = true;
</script>
<script type="text/javascript">
	var dataGrid;
// 	var winWidth =  550;
// 	var winHeight = 370;
// 	var addTitle = "添加线下充值";
// 	var addUrl =  "/modules/account/accountRecharge/accountRechargeAddPage.html";
	
// 	var verifyRechargeUrl = "/modules/account/accountRecharge/verifyRecharge.html"
// 	var verifyRechargeParmeters = "'{0}','" + verifyRechargeUrl+"'";
	
// 	var cancelRechargeUrl = "/modules/account/accountRecharge/cancelRecharge.html"
// 	var cancelRechargeParmeters = "'{0}','" + cancelRechargeUrl+"'";
	
// 	var editTitle="充值审核";
// 	var editUrl="/modules/account/accountRecharge/accountRechargeEditPage.html";
// 	var editWinParmeters = "'{0}','"+editTitle+"',700,550,'"+editUrl+"','确定'";
    
	$(function() {
		var editIndex = undefined;
		dataGrid = $('#dataGrid').datagrid({
			url : 'accountRechargeList.html',
			fit : true,
			fitColumns : true,
			border : false,
			pagination : true,
			idField : 'id',
			pageSize : pageSize,
			pageNums :1,
			pageList : pageList,
			sortName : 'id',
			sortOrder : 'desc',
			checkOnSelect : false,
			selectOnCheck : false,
			nowrap : false,
			singleSelect:true,
				
			columns : [[
				{ field: 'id', title: '编号', width: 50,fixed:true,sortable:true},
				{ field: 'tradeNo', title: '订单号', fixed:true,width: 160},
				{ field: 'userName', title: '用户名', width: 60},
				{ field: 'realName', title: '真实姓名', width: 60},
				{ field: 'money', title: '充值金额(元)',fixed:true, width: 100 },
				{ field: 'amountIn', title: '到账金额(元)',fixed:true, width: 100 },
				{ field: 'fee', title: '手续费(元)',fixed:true, width:125 },
				{ field: 'rechargeFeeBearName', title: '手续费承担方', width: 60 },
				{ field: 'typeStr', title: '充值类型', width: 60 },
				{ field: 'statusStr', title: '状态', width: 60 },
				{ field: 'addTime', title: '添加时间', width: 120,
					formatter: function(value,row,index){
						if (value){
							return getLocalTime(value,4);
						} else {
							return "";
						}
					}
				},
				]],
			toolbar : '#toolbar'
		});
	});

	
</script>
</head>
<body style="padding:0 20px;" >
	<div class="easyui-layout" data-options="fit : true,border : false">
		<div data-options="region:'north',border:false,collapsible:false" id="searchBox">
        	<div class="sLeft">
	            <form id="searchForm">
	            	<input type="text"  name="searchName" class="sInput" placeholder="输入用户名/真实姓名进行搜索" autocomplete="off" onkeydown="if(event.keyCode == 13){ $.fn.dataGridOptions.searchFun('#searchForm');return false;}"/><a href="javascript:;" title="查询" class="sBtn" onclick="$.fn.dataGridOptions.searchFun('#searchForm');">查询</a><a href="javascript:;" class="advBtn" title="条件查询">条件查询 <i class="iconfont">&#xe638;</i></a>
	           		<a href="javascript:void(0);" class="reloadIcon" onclick="dataGrid.datagrid('reload');" title="刷新" ><i class="iconfont">&#xe603;</i></a>
	            </form>
            </div>
            <div class="sRight">
            	<a id="a" onclick="exportExcel();" href="javascript:void(0);" class="addBtn">导出excel</a>	
            </div>
            <form id="showAdw" autocomplete="off">
		        <ul class="showAdw" style="display:none;">
		        	<a href="javascript:void(0);"><i class="iconfont closeWin">&#xe628;</i></a>
		        	<li><span>订单号</span><input type="text" name="tradeNo" id="tradeNo"/></li>
		        	<li><span>用户名</span><input type="text" name="userName" id="userName"/></li>
		        	<li><span>真实姓名</span><input type="text" name="realName" id="realName"/></li>
		        	<li>
		        		<span>状态</span>
		        		<select name="status" id="status" class="type">
		        			<option value="99">全部</option>
							<option value="0">充值处理中</option>
							<option value="1">充值成功</option>
							<option value="2">充值失败</option>
						</select>
					</li>
		       		<li>
		       			<span>类型</span>
		       			<select name="type" id="type" class="type">
							<option value="99">全部</option>
							<option value="1">网上支付</option>
							<option value="2">线下转账</option>
						</select>
					</li>
		       		<li><span>时间</span><input type="text" name="startTime" id="startTime" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\')}',readOnly:true})" class="searchTime"/>&nbsp;-&nbsp;<input type="text" name="endTime" id="endTime" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'startTime\')}',readOnly:true})" class="searchTime"/></li>
		       		<li><span>&nbsp;</span><a href="javascript:void(0);" class="searchBtn sureBtn" onclick="$.fn.dataGridOptions.searchFun('#showAdw');">确定</a><a href="javascript:void(0);" class="searchBtn" onclick="$.fn.dataGridOptions.cleanFun('#searchForm');">重置</a></li>
		        </ul>
	        </form>
		</div>
		<div data-options="region:'center'" style="margin-top:30px;padding-bottom:30px;">
			<table id="dataGrid"></table>
		</div>
	</div>
</body>

<script type="text/javascript">
function exportExcel(){
	var url = "/modules/account/accountRecharge/exportExcelRecharge.html";
	var userName = $("#userName").val();
	var realName = $("#realName").val();
	var status = $("#status").val();
	var startTime = $("#startTime").val();
	var endTime = $("#endTime").val();
	var sou = "?userName=" + userName + "&realName=" + realName + "&status=" + status + "&startTime=" + startTime + "&endTime=" + endTime;
	window.location.href = url + sou;
}

</script>
</html>
<script src="${theme_dir}/js/search.js"></script>
